cmake_minimum_required(VERSION 2.6)

set(CMAKE_INSTALL_PREFIX ${CMAKE_CURRENT_BINARY_DIR}/protonos8)

if (WIN32)

add_definitions(-D_WIN32_WINNT=0x0601 -D_SCL_SECURE_NO_WARNINGS)

include_directories(${CMAKE_CURRENT_SOURCE_DIR}/include f:/local/include)

link_directories(${CMAKE_CURRENT_BINARY_DIR}/protonos8-lib f:/local/lib)
link_libraries(protonos8)

else (WIN32)

set(CMAKE_CXX_FLAGS "-g0 -Os -Wall -fno-strict-aliasing")
set(CMAKE_C_FLAGS "-g0 -Os -Wall -fno-strict-aliasing")
set(CMAKE_EXE_LINKER_FLAGS "-s -Wl,-Map,out.map -Wl,--cref")

include_directories(${CMAKE_CURRENT_SOURCE_DIR}/include /usr/local/include)

link_directories(${CMAKE_CURRENT_BINARY_DIR}/protonos8-lib /usr/local/lib)
link_libraries(protonos8 boost_system boost_program_options boost_regex boost_iostreams boost_thread-mt)

endif (WIN32)

project(protonos8)

add_subdirectory(protonos8-lib)
add_subdirectory(emu)
add_subdirectory(test)
